package io.ken.im.common.domain.model;

import io.ken.im.common.domain.enums.IMTerminalType;

import java.util.List;

/**
 * @author: ken
 * @description: 群发消息
 * @date 2023-12-11
 **/
public class IMGroupMessage<T> {

    /**
     * 消息发送者
     */
    private IMUserInfo sender;

    /**
     * 消息接收者用户ID
     */
    private List<Long> receiveIds;

    /**
     * 消息接收者终端
     */
    private List<Integer> receiveTerminals = IMTerminalType.codes();

    /**
     * 是否发送自己的其他终端
     */
    private Boolean sendToSelf = true;

    /**
     * 发送结果回推
     */
    private Boolean sendResult = true;

    private T data;

    public IMGroupMessage() {
    }

    public IMGroupMessage(IMUserInfo sender, List<Long> receiveIds, List<Integer> receiveTerminals, Boolean sendToSelf, Boolean sendResult, T data) {
        this.sender = sender;
        this.receiveIds = receiveIds;
        this.receiveTerminals = receiveTerminals;
        this.sendToSelf = sendToSelf;
        this.sendResult = sendResult;
        this.data = data;
    }

    public IMUserInfo getSender() {
        return sender;
    }

    public void setSender(IMUserInfo sender) {
        this.sender = sender;
    }

    public List<Long> getReceiveIds() {
        return receiveIds;
    }

    public void setReceiveIds(List<Long> receiveIds) {
        this.receiveIds = receiveIds;
    }

    public List<Integer> getReceiveTerminals() {
        return receiveTerminals;
    }

    public void setReceiveTerminals(List<Integer> receiveTerminals) {
        this.receiveTerminals = receiveTerminals;
    }

    public Boolean getSendToSelf() {
        return sendToSelf;
    }

    public void setSendToSelf(Boolean sendToSelf) {
        this.sendToSelf = sendToSelf;
    }

    public Boolean getSendResult() {
        return sendResult;
    }

    public void setSendResult(Boolean sendResult) {
        this.sendResult = sendResult;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
